import axios from '@/libs/request/axios'
import QS from 'qs';
//获取合同基本信息
export const getBasicInfo = (contractNo, isSp) => {
    let req;
    if (isSp) {
        req = axios.request({
            url: 'apply/contractGateway/getContractDetailInfo',
            data: QS.stringify({contractNo: contractNo}, {arrayFormat: 'repeat'}),
            method: 'post',
            headers: {'content-type': 'application/x-www-form-urlencoded'},
        })
    } else {
        req = axios.request({
            url: '/contractGateway/getContractDetailInfo',
            data: {contractNo},
            method: 'post',
        })
    }
    return req;
};
//获取还款计划表
export const getFormData = (contractNo, isSp) => {
    let req;
    if (isSp) {
        req = axios.request({
            url: 'apply/contractGateway/getRepaymentPlanInfoList',
            data: QS.stringify({contractNo: contractNo}, {arrayFormat: 'repeat'}),
            method: 'post',
            headers: {'content-type': 'application/x-www-form-urlencoded'},
        })
    } else {
        req = axios.request({
            url: '/contractGateway/getRepaymentPlanInfoList',
            data: {contractNo},
            method: 'post',
        })
    }
    return req;
};
